export interface IhospitalListParams {
  page: number
  pageSize: number
  hosname: string
  hoscode: string
  provinceCode: string
  cityCode: string
  districtCode: string
  status: Status
  hostype: string
}

export type Status = 0 | 1

export interface IhospitalList {
  id: string
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    hostypeString: string
    fullAddress: string
  }
  hoscode: string
  hosname: string
  hostype: string
  provinceCode: string
  cityCode: string
  districtCode: string
  address: string
  logoData: string
  intro: string
  route: string
  status: Status
}

// 接口继承: 子接口继承了父接口,父接口里面的内容子接口里面也会有
export interface IhospitalListItem extends IhospitalList {
  bookingRule: IbookingRule
}

export type IhospitalListType = IhospitalListItem[]

export interface IhospitalListResponse {
  content: IhospitalListType
  totalElements: number
}

// 省数据接口
export interface Iprovince {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: object
  parentId: number
  name: string
  value: string
  dictCode: null
  hasChildren: boolean
}
export type IprovinceListType = Iprovince[]

export interface IbookingRule {
  cycle: number
  releaseTime: string
  stopTime: string
  quitDay: number
  quitTime: string
  rule: string[]
}

export interface IhospitalShow {
  bookingRule: IbookingRule
  hospital: IhospitalList
}

//=========================================

// 科室数据接口
export interface Idepartment {
  depname: string
  depcode: string
  children: IdepList | null
  disabled?: boolean
}

export type IdepList = Idepartment[]

// 排班规则(scheduleRule)的接口
export interface IScheduleRuleParams {
  page: number
  pageSize: number
  hoscode: string
  depcode: string
}

// 排班规则响应数据的接口
export interface IScheduleRulesResponse {
  total: number
  bookingScheduleList: IsrbookingRuleList
  baseMap: {
    hosname: string
  }
}

export interface IsrbookingRule {
  workDate: string
  workDateMd: null
  dayOfWeek: string
  docCount: number
  reservedNumber: number
  availableNumber: number
  status: null
}

export type IsrbookingRuleList = IsrbookingRule[]

// 排班列表中每一项数据的接口
export interface IScheduleListItem {
  id: string
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    dayOfWeek: string
    depname: string
    hosname: string
  }
  hoscode: string
  depcode: string
  title: string
  docname: string
  skill: string
  workDate: string
  workTime: number
  reservedNumber: number
  availableNumber: number
  amount: number
  status: Status
  hosScheduleId: string
}

// 排班列表数据类型
export type iScheduleListType = IScheduleListItem[]
